package com.mikelouis.test.scala.proginscala.chapter27.traits

/**
 * Created by yuazhu on 2/25/2015.
 */
trait SimpleRecipes {
  // 假设性类型。从实用角度上看，自身类型(this)指定了对于特质能够混入的具体类的需求
  // 如果你的特质仅用于混入另一个或几个特质，那么可以指定那些假设性的特质
  this: SimpleFoods =>

  object FruitSalad extends Recipe(
    "fruit salad with trait",
    List(Apple, Pear),   // Now Pear is in scope
    "Mix it all together."
  )
  def allRecipes = List(FruitSalad)
}
